package
{
	import flash.display.Sprite;
	
	import sangpil.events.XmlLoaderEvent;
	import sangpil.net.XmlLoader;
	
	public class XmlLoaderTest extends Sprite
	{
		public function XmlLoaderTest()
		{
			super();
			
			var xmlLoader:XmlLoader = new XmlLoader();
			xmlLoader.addEventListener(XmlLoaderEvent.XML_COMPLETE, onLoad);
			xmlLoader.load("./xmlAsset/sample_category_list.xml");
		}
		
		private function onLoad(e:XmlLoaderEvent):void
		{
			var xml:XML = e.xml;
			
			for(var temp:String in xml)
			{
				trace(xml.sub);
			}
			
/* 			for(var temp:String in xml.sub)
			{
				trace(temp);
				trace("step : " + xml.sub[temp]);
			}
			
			var xmllist:XMLList = xml.sub;
			
			for (var temp2:String in xmllist)
			{
				trace(temp2.toString());
				//trace("another step : " +xmllist);
			} */
			
		}
	}
}